package com.spring.serviceimp.front;

import java.util.List;
import java.util.Map;

import com.hibernate.dao.front.IndexDao;
import com.spring.service.front.IndexService;

public class IndexServiceImp implements IndexService{
	
	private IndexDao indexDao=null;
	
	public List findCorrelation(String hql)
	{
		return indexDao.findCorrelation(hql);
	}
	
	/**
	 * read article 
	 * @return
	 */
	public Map findArticle(Long id)
	{
		return indexDao.findArticle(id);
	}
	
	/**
	 * read every categry article list
	 * @return
	 */
	public Map findArticleList(int page,int categryID,int jump)
	{
		return indexDao.findArticleList(page, categryID,jump);
	}
	
	/**
	 * product list
	 */
	public Map findProductList(int page,int categryID,int jump)
	{
		return indexDao.findProductList(page, categryID,jump);
	}
	

	/**
	 * lucene search
	 * @return
	 */
	public Map findSearchResult(String serchString,int page)
	{
		return indexDao.findSearchResult(serchString,page);
	}
	
	
	/**
	 * read product 
	 * @return
	 */
	public Map findProduct(Long id)
	{
		return indexDao.findProduct(id);
	}
	
	
	
	public IndexDao getIndexDao() {
		return indexDao;
	}

	public void setIndexDao(IndexDao indexDao) {
		this.indexDao = indexDao;
	}

}
